# Contributor: Oleg Titov <oleg.titov@gmail.com>
# Maintainer: Oleg Titov <oleg.titov@gmail.com>
pkgname=py3-murmurhash
pkgver=1.0.5
pkgrel=2
pkgdesc="Cython bindings for MurmurHash2"
options="!check" # Requires older version of pytest
url="https://github.com/explosion/murmurhash"
arch="all"
license="MIT"
depends="python3"
makedepends="python3-dev py3-setuptools cython"
checkdepends="py3-pytest py3-mmh3"
subpackages="$pkgname-doc"
source="murmurhash-$pkgver.tar.gz::https://github.com/explosion/murmurhash/archive/v$pkgver.tar.gz"
builddir="$srcdir/murmurhash-$pkgver"

build() {
	python3 setup.py build
}

check() {
	PYTHONPATH="$(echo $PWD/build/lib.*)" pytest-3 murmurhash
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"

	install -Dm644 README.md -t "$pkgdir"/usr/share/doc/$pkgname
}

sha512sums="08cd5ee332d93238b64a8fcb0017c9ba8dcc45821c77b4650cb5ea55d7534b33fcb044404cb4b9be2e2dc6dcb19d6efaf0aee1d523b635188bd1124a761675ad  murmurhash-1.0.5.tar.gz"
